# coding:utf-8
from easydict import EasyDict as edict


__C = edict()

cfg = __C

# info location for desktop
#__C.lat_coarse = (1252, 1017, 1337, 1036)
#__C.lat_coarse = (1259, 1016, 1344, 1035)
__C.lat_coarse = (1260, 1017, 1344, 1035)
#__C.log_coarse = (1415, 1017, 1507, 1036)
#__C.log_coarse = (1421,1016,1513,1036)
__C.log_coarse = (1422,1017,1513,1036)
#__C.alt_coarse = (1581, 1017, 1623, 1036)
#__C.alt_coarse = (1586, 1016, 1628, 1035)
__C.alt_coarse = (1587, 1017, 1628, 1035)


# info location for notebook
# __C.lat_coarse = (697,718,783,734)
# __C.log_coarse = (858,718, 953,734)
# __C.alt_coarse = (1028,718,1071,734)


# fine location for desktop
__C.lat_split = [(3,4,12,18),(12,4,21,18),(30,4,39,18),(39,4,48,18),(48,4,57,18),(57,4,66,18),(66,4,75,18),(75,4,84,18)]
__C.log_split = [(1,4,10,18),(10,4,19,18),(19,4,28,18),(37,4,46,18),(46,4,55,18),(55,4,64,18),(64,4,73,18),(73,4,82,18),(82,4,91,18)]
__C.alt_split = [(5,4,14,18),(14,4,23,18),(23,4,32,18),(32,4,41,18)]

# find location for notebook
# __C.lat_split = [(4,1,13,15),(13,1,22,15),(31,1,40,15),(40,1,49,15),(49,1,58,15),(58,1,67,15),(67,1,76,15),(76,1,85,15)]
# __C.log_split = [(4,1,13,15),(13,1,22,15),(22,1,31,15),(40,1,49,15),(49,1,58,15),(58,1,67,15),(67,1,76,15),(76,1,85,15),(85,1,94,15)]
# __C.alt_split = [(4,1,13,15),(13,1,22,15),(22,1,31,15),(31,1,40,15)]

# info format
__C.lat_format = '%s%s.%s%s%s%s%s%s'
__C.log_format = '%s%s%s.%s%s%s%s%s%s'
__C.alt_format = '%s%s%s%s'

# craw parameters
__C.from_ = '杭垓起点'
__C.to_ = '七管终点'
__C.craw_rect = (455,422,1826,535)
__C.craw_interval = 2
__C.ocr_model = 'digit_model.h5'
__C.start_loc = (30.576275 ,119.379697)
__C.stop_loc = (30.651041 ,119.369870)

# other info
__C.gt = 15.0 # unit kg, takeoff weight
__C.ax = 6 #axis of drone
__C.v = 11.0 #speed of cruise
__C.W_cruise = (0.402*__C.v**3 - 6.2816*__C.v**2 + 11.0257*__C.v)+(__C.gt / __C.ax)*1000/(-0.089*(__C.gt / __C.ax)**3 + 1.1531*(__C.gt / __C.ax)**2 - 5.7839*(__C.gt / __C.ax) + 17.147 )*__C.ax+60 #capacity of level flight


